import type { App, Plugin } from 'vue'

// 骨架屏组件
import XtxSkeleton from './Skeleton/index.vue'
import XtxSlider from './Slider/index.vue'
import XtxMore from './More/index.vue'
import XtxBread from './Bread/index.vue'
import XtxBreadItem from './BreadItem/index.vue'
import XtxCheckbox from './Checkbox/index.vue'
import XtxInfinite from './Infinite/index.vue'

const allComponent = [XtxSkeleton, XtxSlider, XtxMore, XtxBread, XtxBreadItem, XtxCheckbox, XtxInfinite]

const components: Plugin = {
  install(app: App) {
    // app.component('XtxSkeleton', Skeleton)
    // app.component('XtxSlider', Slider)
    // app.component('XtxMore', More)
    // app.component('XtxBread', Bread)
    // app.component('XtxBreadItem', BreadItem)

    allComponent.forEach((component) => {
      app.component(component.name, component)
    })
  }
}

export default components
